package com.yanze.schoolinformation.viewModule.circle;

import com.yanze.schoolinformation.app.C;
import com.yanze.schoolinformation.model.bean.resp.RespLosted;
import com.yanze.schoolinformation.model.http.DeforObserver;
import com.yanze.schoolinformation.model.http.reqo.DataReqo;
import com.yanze.schoolinformation.view.community.circle.LostthingActivity;

import io.reactivex.disposables.Disposable;

/**
 * Created by MrZheng on 2018/5/21.
 */

public class LostthingViewModule  {
    private LostthingNavigator mNavigator;
    private LostthingActivity mActivity;
    private int page = 1;
    private int pageSize = 20;

    public LostthingViewModule(LostthingActivity mActivity) {
        this.mActivity = mActivity;
    }

    public void setmNavigator(LostthingNavigator mNavigator) {
        this.mNavigator = mNavigator;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    /**
     * 请求网络
     */
    public void getLostList() {
        DataReqo.getInstant().getLostList(C.url.API_School,page,pageSize)
                .subscribe(new DeforObserver<RespLosted>() {
                    @Override
                    public void _onSubscribe(Disposable disposable) {

                    }

                    @Override
                    public void _onNext(RespLosted entity) {

                    }

                    @Override
                    public void _onError(String msg) {

                    }
                });
    }

    public void onDestory() {

    }
}
